package com.ruoyi.video.service;

import com.ruoyi.common.support.Convert;
import com.ruoyi.video.domain.VideoInfo;
import com.ruoyi.video.mapper.VideoInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 视频 服务层实现
 * 
 * @author pig13
 * @date 2018-11-11
 */
@Service
public class VideoInfoServiceImpl implements VideoInfoService
{
	@Autowired
	private VideoInfoMapper videoInfoMapper;

	/**
     * 查询视频信息
     * 
     * @param id 视频ID
     * @return 视频信息
     */
    @Override
	public VideoInfo selectVideoInfoById(Integer id)
	{
	    return videoInfoMapper.selectVideoInfoById(id);
	}
	
	/**
     * 查询视频列表
     * 
     * @param videoInfo 视频信息
     * @return 视频集合
     */
	@Override
	public List<VideoInfo> selectVideoInfoList(VideoInfo videoInfo)
	{
	    return videoInfoMapper.selectVideoInfoList(videoInfo);
	}
	
    /**
     * 新增视频
     * 
     * @param videoInfo 视频信息
     * @return 结果
     */
	@Override
	public int insertVideoInfo(VideoInfo videoInfo)
	{
	    return videoInfoMapper.insertVideoInfo(videoInfo);
	}
	
	/**
     * 修改视频
     * 
     * @param videoInfo 视频信息
     * @return 结果
     */
	@Override
	public int updateVideoInfo(VideoInfo videoInfo)
	{
	    return videoInfoMapper.updateVideoInfo(videoInfo);
	}

	/**
     * 删除视频对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteVideoInfoByIds(String ids)
	{
		return videoInfoMapper.deleteVideoInfoByIds(Convert.toStrArray(ids));
	}
	
}
